import java.util.ArrayList;
import java.util.List;

class School {
    private List<Department> departments;

    public School() {
        this.departments = new ArrayList<>();
    }

    public void addDepartment(Department department) {
        departments.add(department);
    }
}

class Department {
    private String name;
    private List<Instructor> instructors;
    private List<Subject> subjects;

    public Department(String name) {
        this.name = name;
        this.instructors = new ArrayList<>();
        this.subjects = new ArrayList<>();
    }

    public void addInstructor(Instructor instructor) {
        instructors.add(instructor);
    }

    public void addSubject(Subject subject) {
        subjects.add(subject);
    }

}

class Instructor {
    private String name;
    private Department department;
    private List<Subject> subjectsTaught;

    public Instructor(String name, Department department) {
        this.name = name;
        this.department = department;
        this.subjectsTaught = new ArrayList<>();
    }

    // 添加教授的课程  
    public void addSubjectTaught(Subject subject) {
        if (subjectsTaught.size() < 3) {
            subjectsTaught.add(subject);
        }
    }
}

class Subject {
    private String name;

    public Subject(String name) {
        this.name = name;
    }

}

class Student {
    private String name;
    private List<Subject> subjectsEnrolled;

    public Student(String name) {
        this.name = name;
        this.subjectsEnrolled = new ArrayList<>();
    }
    public void enrollInSubject(Subject subject) {
        if (subjectsEnrolled.size() < 5) {
            subjectsEnrolled.add(subject);
        }
    }
}

public class Main3 {
    public static void main(String[] args) {
    }
}